﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CustomerInfo>" %>
<%@ Import namespace="MvcApplication.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Save Customer Information
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>New Customer</h2>
    <form action="<%=Url.Action("Save") %>" method="post">
<%--        <fieldset>
            <div>
            <%=Html.LabelFor(customer => customer.FirstName) %>
            <%=Html.TextBoxFor(customer => customer.FirstName) %>
            </div>
            <div>
                <%=Html.LabelFor(customer => customer.LastName) %>
                <%=Html.TextBoxFor(customer => customer.LastName)%>
                <%=Html.ValidationMessageFor(customer => customer.LastName,"Last name required.") %>
            </div>
            <div>
            <%=Html.LabelFor(customer => customer.Active) %>
            <%=Html.CheckBoxFor(customer => customer.Active) %>
            </div>
            <div>
                <button type="submit">Save</button>
            </div>
        </fieldset>--%>
        <div>
        <fieldset>
            <legend>Edit for Model</legend>
            <%=Html.EditorForModel("Object") %>
            <p>
                <button type="submit">Save</button>
            </p>
        </fieldset>
        </div>

        <div>
        <fieldset>
            <legend>Edit for Demo</legend>
            <p>
                <%=Html.EditorFor(customer => customer.FirstName) %>
            </p>
            <p>
                <%=Html.EditorFor(customer => customer.LastName) %>
            </p>
            <p>
                <%=Html.EditorFor(customer => customer.Active) %>
            </p>

            <p>
                <button type="submit">Save</button>
            </p>
        </fieldset>
        </div>
    </form>
</asp:Content>
